package demo1;

//牛客网:添加逗号
import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String num = in.next();
        StringBuffer ret = new StringBuffer();
        int len = num.length();
        if(len <=3) {
            System.out.println(num);
            return;
        }
        int i = len%3;
        if(i!=0) {
            ret.append(num.substring(0,i));
            ret.append(",");
        }
        while(i<=len-3) {
            ret.append(num.substring(i,i+3));
            if(i<len-3) {
                ret.append(",");
            }
            i+=3;
        }
        System.out.println(ret);
    }
}